home *** CD-ROM | disk | FTP | other *** search
/ Day Cry / Day Cry CD.bin / oh_towns / ein / sources / einlib.lzh / LIBSRC.LZH / EIN_FL02.C < prev    next >
C/C++ Source or Header  |  1994-07-18  |  2KB  |  80 lines

  1. /*<Header>==============================================================
  2. *
  3. *    FILE MANAGER / "EIN_FL02.C"
  4. *
  5. *        [ EIN(tm) project : âtâ@âCâïæÇì∞òΓÅòè╓ÉöîQ ]
  6. *
  7. *    COPYRIGHT  Nam  1994, All rights reserved.
  8. *
  9. *-----------------------------------------------------------------------
  10. *    V1.0L01â┐    94.07.07/Nam    âvâìâgâ^âCâv
  11. *</Header>==============================================================*/
  12. #include    <stdio.h>
  13. #include     <stdlib.h>
  14. #include     <string.h>
  15. #include    <snd.h>
  16. #include    <winb.h>
  17. #include    <te.h>
  18. #include    <fntb.h>
  19. #include    <gui.h>
  20.  
  21. #define    EIN_FILE
  22. #include    "..\eintm.h"
  23.  
  24. #ifndef NOERR
  25. #define    NOERR    (0)
  26. #endif
  27. #ifndef ERROR
  28. #define    ERROR    (1)
  29. #endif
  30.  
  31. /* from EIN_ASM1.ASM */
  32. extern void        EIN_setVector( unsigned long * );
  33. extern void        EIN_resetVector( unsigned long * );
  34.  
  35. /* from EIN_ASM2.ASM */
  36. extern int    _EIN_getSect( char );
  37.  
  38. /*<Func>================================================================
  39. *    int        EIN_getSectSize( int drv )
  40. *
  41. *    üyèT  ùvüz    ÄwÆΦâhâëâCâué╠âZâNâ^âTâCâYĵô╛
  42. *
  43. *    üyï@  ö\üz    ÄwÆΦâhâëâCâué╠âZâNâ^âTâCâY(byteÉö)é≡ĵô╛é╡é▄é╖üB
  44. *                int24hânâôâhâëé≡âtâbâNé╡é─éóéΘé╠é┼üAâhâëâCâué╔âAâNâZâX
  45. *                é┼é½é╚é⌐é┴é╜ÅΩìçé┼éαâVâFâïé╠âAâëü[âgé≡Åoé╡é▄é╣é±üB
  46. *                îπÅqé╠'EIN_getDiskFree'é╞ò╣ùpé╖éΩé╬üAòíÉöâtâ@âCâïé≡
  47. *                âRâsü[ë┬ö\é⌐ö█é⌐é≡â`âFâbâNé┼é½é▄é╖üB
  48. *
  49. *    üyôⁿ  ù═üz
  50. *                drv        :    â`âFâbâNé╡é╜éóâhâëâCâuö╘ìå(ëpæσò╢ÄÜ)
  51. *                            [ùß] size = EIN_getSectSize('A');
  52. *                                 size = EIN_getSectSize( EIN_fnameDrv("E:\\"));
  53. *
  54. *    üyÅo  ù═üz
  55. *
  56. *    üyè╓ÉöÆlüz    >= 0        É│ÅφÅIù╣(byte)
  57. *                == -1        ê┘ÅφÅIù╣(âpâëâüü[â^âGâëü[/âhâëâCâué╔âAâNâZâXòsë┬)
  58. *
  59. *    üyÆì  ê╙üz    
  60. *
  61. *    üyÄQ  Å╞üz    
  62. *
  63. *-----------------------------------------------------------------------
  64. *    V11L10    1994.07.16/Nam
  65. *</Func>==============================================================*/
  66. int        EIN_getSectSize( int drv )
  67. {
  68.     unsigned long    vect[3];    /* int24hânâôâhâëé╠æ▐ö≡ùp */
  69.     register int        ret;
  70.     
  71.     if ( drv<'A' || drv>'Z' ){
  72.         return ERROR;
  73.     }
  74.     EIN_setVector( vect );        /* int24é≡âtâbâN */
  75.     ret = _EIN_getSect( drv );
  76.     EIN_resetVector( vect );    /* int24ânâôâhâëé≡ò£ïA */
  77.     return ret;
  78. }
  79.  
  80.